package com.hnkywl.sts.entity.cggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.sys.Gg;
import com.hnkywl.sts.entity.xsgl.Kh;
import com.hnkywl.sts.entity.xsgl.Xsd;
import com.hnkywl.sts.entity.xsgl.Xsmx;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created by Jerry on 13-10-16.
 */
@Entity
@Table(name = "T_BIZ_XSJSDMX")
@Where(clause = "deleted!='1'")
public class Xsjsdmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqXsjsdmx", allocationSize = 1, sequenceName = "SEQ_BIZ_XSJSDMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqXsjsdmx")
    private Long id;
    // 采购单明细
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "GG_ID")
    private Gg gg;
    // 图号
    private String th;

    // 卡号
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KH_ID")
    private Kh kh;
    // 产地
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SJZDZ_CD_ID")
    private Sjzdz cd;
    // 长/宽
    private String ck;

    // 含税价
    private Double hsj;

    // 金额（税务系统）
    private Double swje;

    // 不含税价
    private Double bhsj;

    //入库数量
    private Double cksl;

    // 净额
    private Double je;

    // 税额
    private Double se;

    // 税额（税务系统）
    private Double swse;


    // 差额(系统税额-税务系统税额)
    private Double ce;

    //成本金额 移动成本计算所得
    private Double cbje;

    //采购结算单
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSJSD_ID")
    private Jsd jsd;

    //采购单明细ID
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSMX_ID")
    private Xsmx xsmx;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSD_ID")
    private Xsd xsd;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Gg getGg() {
        return gg;
    }

    public void setGg(Gg gg) {
        this.gg = gg;
    }

    public String getTh() {
        return th;
    }

    public void setTh(String th) {
        this.th = th;
    }

    public Kh getKh() {
        return kh;
    }

    public void setKh(Kh kh) {
        this.kh = kh;
    }

    public Sjzdz getCd() {
        return cd;
    }

    public void setCd(Sjzdz cd) {
        this.cd = cd;
    }

    public String getCk() {
        return ck;
    }

    public void setCk(String ck) {
        this.ck = ck;
    }

    public Double getHsj() {
        return hsj;
    }

    public void setHsj(Double hsj) {
        this.hsj = hsj;
    }

    public Double getBhsj() {
        return bhsj;
    }

    public void setBhsj(Double bhsj) {
        this.bhsj = bhsj;
    }

    public Double getCksl() {
        return cksl;
    }

    public void setCksl(Double cksl) {
        this.cksl = cksl;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public Double getSe() {
        return se;
    }

    public void setSe(Double se) {
        this.se = se;
    }

    public Double getCe() {
        return ce;
    }

    public void setCe(Double ce) {
        this.ce = ce;
    }

    public Double getCbje() {
        return cbje;
    }

    public void setCbje(Double cbje) {
        this.cbje = cbje;
    }

    public Jsd getJsd() {
        return jsd;
    }

    public void setJsd(Jsd jsd) {
        this.jsd = jsd;
    }

    public Xsmx getXsmx() {
        return xsmx;
    }

    public void setXsmx(Xsmx xsmx) {
        this.xsmx = xsmx;
    }

    public Xsd getXsd() {
        return xsd;
    }

    public void setXsd(Xsd xsd) {
        this.xsd = xsd;
    }

    public Double getSwje() {
        return swje;
    }

    public void setSwje(Double swje) {
        this.swje = swje;
    }

    public Double getSwse() {
        return swse;
    }

    public void setSwse(Double swse) {
        this.swse = swse;
    }
}
